<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://www.etcore.com/grouptalk" prefix="grouptalk"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<head>
<title><c:out value='${currentGroup.name }' />-<c:out
	value='${context.title }' /></title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">
<script>
 
var width=window.screen.width;
 
var n=10;
if(width>=1600){
n=12;
 
}else if(width<=800){
n=8;
 	
}
</script>
<script>
function showSub(id){

	var submenu=document.getElementById('sub'+id);
	var parentmenu=document.getElementById('root'+id);
	var gif=document.getElementById('img'+id);
 
	if(	submenu.style.display=="none")  {
		submenu.style.display="block";
		submenu.style.left=parentmenu.style.left;
		gif.src="/group/images/minus.gif";
 
	}
	else {
		submenu.style.display="none";
		gif.src="/group/images/plus.gif";
 
	}
	

}
</script>
</head>
<body bottomMargin=0 leftMargin=10 topMargin=0 onload=preloadImages()
	rightMargin=10 marginheight="0">
<c:import url="/group/ui-component/divdialog/divdialog.html" />
<TABLE cellSpacing=0 cellPadding=0 border=0 width=100% align=center>

	<TR>
		<TD height=30 width=100%><c:import
			url="/banner.jsp?currentPlatform=3" /></TD>
	</TR>




	<TR>
		<TD vAlign=top width=100%>
		<table width=100% cellSpacing=0 cellPadding=0>
			<tr>



				<td valign=top width=100%>
				<table cellpadding=0 cellspacing=0 width=100%>
					<tr>
						<td valign=top nowrap>
						<div
							style="  border: 1px solid #D6E0FC; margin-top: 5px;">
						<table   cellSpacing=0 cellPadding=0>
							<tr>
								<td><A style="font-weight: bold"
									href="/group/bookmarks<c:out value="${context.postfix}" />"><c:out
									value="${context.platform3}" /></A></td>
							</tr>

							<c:forEach var="directory" items="${directories3}">
								<tr>
									<td>
									<div>

									<div id="root<c:out value='${directory.id }' />"
										style="height: 25px; cursor: pointer"
										onclick="showSub('<c:out value='${directory.id }' />')">
									<table>
										<tr>
											<td><img id="img<c:out value='${directory.id }' />"
												<c:if test="${directory.id!=currentDirectory.id }">
												src="/group/images/plus.gif"</c:if>
												<c:if test="${directory.id==currentDirectory.id }">
												src="/group/images/minus.gif"</c:if>
												border=0 /><img src="/group/images/dir.gif" border=0 /></td>
											<td nowrap><c:out value='${directory.name}' /></td>
										</tr>
									</table>

									</div>
									<div id="sub<c:out value='${directory.id }' />" class="sub"
										style="position: relative; margin-left: 0; <c:if test="${directory.id!=currentDirectory.id }">display: none;</c:if> width: 160px; z-index: 1;">
									<table>
										<c:set var="groups" value="${directory.id }groups" />
										<c:forEach var="group" items="${requestScope[groups]}">
											<tr>
												<td nowrap><img src="/group/images/sub.gif" border=0><c:if
													test="${!context.encryptedUrl3}">
													<a
														<c:if test="${group.id==param.gid }">style="color:red;font-weight:bold;"</c:if>
														href="/group/bookmarksView<c:out value='${context.postfix}'/>?gid=<c:out value='${group.id }'/>"><img
														src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
														value='${group.name }' /></a>
												</c:if> <c:if test="${context.encryptedUrl3}">
													<c:set var='urlFragmentStr' value='?gid=${group.id}' />
													<c:set var='urlFragment'
														value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
													<a
														<c:if test="${group.id==param.gid }">style="color:red;font-weight:bold;"</c:if>
														href="/group/bookmarksView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><img
														src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
														value='${group.name }' /></a>
												</c:if></td>
											</tr>
										</c:forEach>
									</table>
									</div>

									</div>
									</td>
								</tr>
							</c:forEach>
							<c:forEach var="group" items="${rootGroups3}">
								<tr>
									<td nowrap
										style="height: 25px; padding-left: 10px; height: 25px;"><c:if
										test="${!context.encryptedUrl3}">
										<a
											<c:if test="${group.id==param.gid }">style="color:red;font-weight:bold;"</c:if>
											href="/group/bookmarksView<c:out value='${context.postfix}'/>?gid=<c:out value='${group.id }'/>"><img
											src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
											value='${group.name }' /></a>
									</c:if> <c:if test="${context.encryptedUrl3}">
										<c:set var='urlFragmentStr' value='?gid=${group.id}' />
										<c:set var='urlFragment'
											value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
										<a
											<c:if test="${group.id==param.gid }">style="color:red;font-weight:bold;"</c:if>
											href="/group/bookmarksView<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><img
											src="/group/images/bookmark.gif" border=0 />&nbsp;<c:out
											value='${group.name }' /></a>
									</c:if></td>
								</tr>
							</c:forEach>
						</table>

						</div>



						</td>
						<td valign=top width=100%>
						<table cellpadding=2 cellspacing=2 width=100% align=left>


							<tr>
								<td colspan=2 height=15 valign=top width=100%>
								<table width=100%>
									<tr>
										<td valign=top nowrap>
										<div style="border: 1px solid #d2d4d2;">
										<table>


											<c:forEach var="topic" items="${topics }">
												<c:set var='topicSize' value='${topic.id }size' />
												<tr>
													<td nowrap><c:if test="${!(context.encryptedUrl3) }">
														<a
															<c:if
																			test="${topic.id==param.tid||(not empty tid && topic.id==tid) }"> style="color:red; font-weight:bold;"</c:if>
															href="/group/bookmarksView<c:out value='${context.postfix}' />?gid=<c:out value='${param.gid }' />&tid=<c:out value='${topic.id }' />">

														<c:out value='${topic.name }' />[<c:out
															value='${requestScope[topicSize]}' />] </a>
													</c:if><c:if test="${(context.encryptedUrl3) }">
														<c:set var='urlFragmentStr'
															value="?gid=${param.gid }&tid=${topic.id }" />
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a
															<c:if
																			test="${topic.id==param.tid||(not empty tid && topic.id==tid) }"> style="color:red;font-weight:bold;"</c:if>
															href="/group/bookmarksView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"><c:out
															value='${topic.name }' />[<c:out
															value='${requestScope[topicSize]}' />]</a>
													</c:if></td>
												</tr>
												<c:set var="count" value="${count+1 }" />
											</c:forEach>
										</table>
										</div>
										</td>
										<td width=100% valign=top>
										<table width=100%>




											<c:set var="mcount" value="0" />
											<c:forEach var="message" items="${msgs}">
												<c:set var="currentImg" value="" />
												<c:set var="messageImages" value="${message[0]}attachments" />
												<c:forEach var="image"
													items="${requestScope[messageImages]}">
													<c:set var="currentImg" value="${image }" />
												</c:forEach>
												<c:if test='${ currentImg eq ""}'>
													<c:set var="currentImg" value="/group/images/no.gif" />
												</c:if>
												<c:if test='${mcount%2==0 }'>
													<tr>
												</c:if>

												<td width=50%>

												<table cellpadding=0 cellspacing=0 width=100%
													style="border: 1px solid #d4d2d4;  height: 168px">
													<tr bgcolor="#f3f3f3">
														<td nowrap colspan=2 align=left width=100%
															style="font-weight: bold;">
														<div style="overflow: hidden"><c:if
															test="${!(context.msg_encryptedUrl) }">
															<a
																href="/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />"
																target=_blank><c:out value='${message[2]}' /></a>
														</c:if> <c:if test="${(context.msg_encryptedUrl) }">
															<c:set var='urlFragmentStr' value="?id=${message[0] }" />
															<c:set var='urlFragment'
																value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
															<a
																href="/group/messagedetail<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"
																target=_blank><c:out value='${message[2] }' /></a>
														</c:if></div>
														</td>

													</tr>
													<tr>
														<td colspan=2 style="font-size: 12px; color: #999999;border-bottom:1px dashed #d2d4d2"><a
															style="font-size: 12px; color: blue;"
															title="<c:out value='${message[9]}' />" target=_blank
															href='<c:if test="${!(fn:startsWith(message[9],'http'))}">http://${message[9]}</c:if><c:if test="${(fn:startsWith(message[9],'http'))}">${message[9]}</c:if>'>
														<c:out value='${fn:substring(message[9], 0, 40)}' /></a></td>
													</tr>


													<tr>
														<td   width=125  ><a
															style="font-size: 12px; color: blue;"
															title="<c:out value='${message[9]}' />" target=_blank
															href='<c:if test="${!(fn:startsWith(message[9],'http'))}">http://${message[9]}</c:if><c:if test="${(fn:startsWith(message[9],'http'))}">${message[9]}</c:if>'>
														<img src="${currentImg }" width=120 height=110 ></a></td>
														<td align=left   valign=top width=100%
															style="height: 115px">

														<div
															style="height: 110px;   topmargin: 0px; overflow-y: auto">
														<c:if test="${!(context.msg_encryptedUrl) }">
															<a style="font-size: 12px; color: #999999;"
																href="/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />"
																target=_blank> <c:if test="${not empty message[8] }">
																<c:out value='${message[8] }' escapeXml="false" />
															</c:if> </a>
														</c:if> <c:if test="${(context.msg_encryptedUrl) }">
															<c:set var='urlFragmentStr' value="?id=${message[0] }" />
															<c:set var='urlFragment'
																value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
															<a style="font-size: 12px; color: #999999;"
																href="/group/messagedetail<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"
																target=_blank><c:if test="${not empty message[8] }">
																<c:out value='${message[8] }' escapeXml="false" />
															</c:if></a>
														</c:if></div>

														</td>
													</tr>
													<tr>
														<td colspan=2 align=right width=100%
															style="font-size: 12px; color: #999999"><c:out
															value='${context.text_publish }' />：<c:out
															value='${message[3] }' /><c:set var="lastComment"
															value='${message[0] }lastComment' />&nbsp;<c:if
															test="${not empty requestScope[lastComment] }">
															<c:out value='${context.text_last_reply }' />：<c:out
																value='${requestScope[lastComment] }' />&nbsp;									
								</c:if></td>
													</tr>

													<tr>
														<td colspan=2 align=right width=100%
															style="font-size: 12px; color: #999999"><c:if
															test="${!(context.msg_encryptedUrl) }">
															<a style="font-size: 12px; color: #999999;"
																href="/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />"
																target=_blank> <c:out value='${context.text_click }' />：<c:out
																value='${message[5] }' /> &nbsp;<c:out
																value='${context.text_comment }' />：<c:set
																var="commentNum" value='${message[0] }commentNum' /><c:out
																value='${requestScope[commentNum] }' />&nbsp; </a>
														</c:if> <c:if test="${(context.msg_encryptedUrl) }">
															<c:set var='urlFragmentStr' value="?id=${message[0] }" />
															<c:set var='urlFragment'
																value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
															<a style="font-size: 12px; color: #999999;"
																href="/group/messagedetail<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"
																target=_blank><c:out value='${context.text_click }' />：<c:out
																value='${message[5] }' /> &nbsp;<c:out
																value='${context.text_comment }' />：<c:set
																var="commentNum" value='${message[0] }commentNum' /><c:out
																value='${requestScope[commentNum] }' />&nbsp;</a>
														</c:if></td>
													</tr>

												</table>


												</td>
												<c:if test='${mcount%2==1 }'>
													</tr>
												</c:if>
												<c:set var="mcount" value="${mcount+1 }" />

											</c:forEach>

											<c:if test='${count%2==0 }'>
												</tr>
											</c:if>
											<tr>
												<td align=right height=15 colspan=2><font color=red><c:out
													value='${all }' /></font>&nbsp;<c:if
													test="${not empty param.key}">
													<c:out value='${context.text_find}' />&nbsp;<font
														color=red><c:out value='${param.key}' /></font>&nbsp;</c:if><c:out
													value='${context.text_related}' />&nbsp;<c:out
													value='${context.text_item}' />:</td>
											</tr>
											<tr>
												<td height=30 colspan=2></td>
											</tr>
											<tr bgcolor="#ffffff">
												<td align=left colspan=2><c:set var="pid"
													value="${startpid }" /> <c:forEach begin="${startpid }"
													end="${endpid }" step="1">
													<c:if test="${!(context.encryptedUrl3) }">
														<c:set var="url"
															value="/group/bookmarksView${context.postfix}?pageid=${pid}&gid=${param.gid}" />
														<c:if test='${not empty (param.key) }'>
															<c:set var="url" value="${url }&key=${param.key}" />
														</c:if>
														<c:if test='${not empty (param.tid) }'>
															<c:set var="url" value="${url }&tid=${param.tid}" />
														</c:if>
														<a
															<c:if test='${intpageid==pid }'>
															style="font-weight:bold;color:red;"
														</c:if>
															href="${url }">[<c:out value='${pid}' />]</a>
													</c:if>
													<c:if test="${(context.encryptedUrl3) }">
														<c:set var='urlFragmentStr'
															value="?pageid=${pid}&gid=${param.gid}" />
														<c:if test='${not empty param.key }'>
															<c:set var="urlFragmentStr"
																value="${urlFragmentStr }&key=${param.key}" />
														</c:if>
														<c:if test='${not empty param.tid }'>
															<c:set var="urlFragmentStr"
																value="${urlFragmentStr }&tid=${param.tid}" />
														</c:if>
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a
															<c:if test='${intpageid==pid }'>
															style="font-weight:bold;color:red;"
														</c:if>
															href="/group/bookmarksView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />">
														[<c:out value='${pid}' />]</a>
													</c:if>
													<c:set var="pid" value="${pid+1 }" />
&nbsp;&nbsp;</c:forEach> <c:if test="${intpageid>1 }">
													<c:if test="${!(context.encryptedUrl3) }">
														<c:set var="url"
															value="/group/bookmarksView${context.postfix}?pageid=${intpageid-1}&gid=${param.gid}" />
														<c:if test='${not empty (param.key) }'>
															<c:set var="url" value="${url }&key=${param.key}" />
														</c:if>
														<c:if test='${not empty (param.tid) }'>
															<c:set var="url" value="${url }&tid=${param.tid}" />
														</c:if>
														<a href="${url }"> [<c:out
															value='${context.previous_page}' />] </a>
													</c:if>
													<c:if test="${(context.encryptedUrl3) }">
														<c:set var='urlFragmentStr'
															value="?pageid=${intpageid-1}&gid=${param.gid}" />
														<c:if test='${not empty param.key }'>
															<c:set var="urlFragmentStr"
																value="${urlFragmentStr }&key=${param.key}" />
														</c:if>
														<c:if test='${not empty param.tid }'>
															<c:set var="urlFragmentStr"
																value="${urlFragmentStr }&tid=${param.tid}" />
														</c:if>
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a
															href="/group/bookmarksView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />">
														[<c:out value='${context.previous_page}' />] </a>
													</c:if>
&nbsp;
</c:if> <c:if test="${intpageid<pagenums }">
													<c:if test="${!(context.encryptedUrl3) }">
														<c:set var="url"
															value="/group/bookmarksView${context.postfix}?pageid=${intpageid+1}&gid=${param.gid}" />
														<c:if test='${not empty (param.key) }'>
															<c:set var="url" value="${url }&key=${param.key}" />
														</c:if>
														<c:if test='${not empty (param.tid) }'>
															<c:set var="url" value="${url }&tid=${param.tid}" />
														</c:if>
														<a href="${url }"> [<c:out
															value='${context.next_page}' />] </a>
													</c:if>
													<c:if test="${(context.encryptedUrl3) }">
														<c:set var='urlFragmentStr'
															value="?pageid=${intpageid+1}&gid=${param.gid}" />
														<c:if test='${not empty param.key }'>
															<c:set var="urlFragmentStr"
																value="${urlFragmentStr }&key=${param.key}" />
														</c:if>
														<c:if test='${not empty param.tid }'>
															<c:set var="urlFragmentStr"
																value="${urlFragmentStr }&tid=${param.tid}" />
														</c:if>
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a
															href="/group/bookmarksView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />">
														[<c:out value='${context.next_page}' />] </a>
													</c:if>
&nbsp;
</c:if></td>
											</tr>
										</table>
										</td>
									</tr>

								</table>

								</td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</TD>
	</tr>
	<tr>
		<td><BR>
		<BR>
		<c:import url="/footer.jsp" /></td>
	</tr>


</table>

</body>

